<script setup>
import { inject } from "vue";



//2.接收数据
const roomData =inject('roomData')
const roomCount =inject('roomCount')
const setRoomCount =inject('setRoomCount')
</script>

<template>
    <div class="name">
        底层组件
        <div>来自顶层组件的数据: {{roomData}}</div>
        <div>来自顶层组件的响应式数据:{{ roomCount }}</div>
        <button @click="setRoomCount">{{ roomCount }}</button>
    </div>
</template>